<%= turbo_frame_tag :export_dialog do %>
  <%= form_for @export, url: spree.admin_exports_path do |f| %>
    <%= f.hidden_field :type %>
    <%= f.hidden_field :search_params %>
    <div class="dialog-header">
      <h5 class="dialog-title">
        <%= Spree.t(:export) + ' ' + plural_resource_name(@export.model_class) %>
      </h5>
      <button type="button" class="btn-close" data-action="click->export-dialog#close" aria-label="Close"></button>
    </div>
    <div class="dialog-body">
      <%= render 'spree/admin/shared/error_messages', target: @export %>
      <div class="custom-control custom-radio">
        <%= f.radio_button :record_selection, 'filtered', class: 'custom-control-input' %>
        <%= f.label :record_selection, for: :export_record_selection_filtered, class: 'custom-control-label' do %>
          <%= Spree.t(:filtered_records) %>
          <br />
          <span class="text-muted font-weight-normal mr-1">
            <%= Spree.t('admin.export_only_filtered_records') %>
          </span>
        <% end %>
      </div>
      <div class="custom-control custom-radio mt-3">
        <%= f.radio_button :record_selection, 'all', class: 'custom-control-input' %>
        <%= f.label :record_selection, for: :export_record_selection_all, class: 'custom-control-label' do %>
          <%= Spree.t(:all) %>
          <br />
          <span class="text-muted font-weight-normal mr-1">
            <%= Spree.t('admin.export_all') %>
          </span>
        <% end %>
      </div>
    </div>
    <div class="dialog-footer">
      <button type="button" class="btn btn-light" data-action="click->export-dialog#close" aria-label="Close">
        <%= Spree.t('actions.discard') %>
      </button>
      <%= turbo_save_button_tag Spree.t(:export), class: 'btn btn-primary' %>
    </div>
  <% end %>
<% end %>